/*
 * Copyright (c) 2017. 深圳掌控网络有限公司. All rights reserved.
 */

package com.yiqi.lottery.feature.mine.contract;

import com.suozhang.framework.entity.bo.UserInfoBo;
import com.suozhang.framework.framework.BasePresenter;
import com.suozhang.framework.framework.BaseView;
import com.yiqi.lottery.entity.bo.EditPwdBo;
import com.yiqi.lottery.entity.bo.RegisterBo;
import com.yiqi.lottery.entity.bo.TokenBo;
import com.yiqi.lottery.entity.bo.UploadBo;
import io.reactivex.Observable;

/**
 *      LIJUWEN
 * @email yiyayiyayaoljw@gmail.com
 * @date 2017/4/11 9:06
 */
public interface MineContract {

    interface Model {
        Observable<UserInfoBo> getUsertInfo();
        Observable<String> getUserAuth(RegisterBo registerBo);
        Observable<String> getEditPassword(EditPwdBo editPwdBo);
        Observable<String> userSendCode(String mobile);
        Observable<TokenBo> getQiniuToken();
        Observable<UserInfoBo> editUserInfo(Integer userId,UserInfoBo userInfoBo);
    }

    interface View extends BaseView {
        void showUserInfoSuccess(UserInfoBo userInfoBo);

        void showAuthSuccess(String msg);
        void showSendCodeSuccess(String code);
        void showEditPwdSuccess(String msg);
        void showSendCodeError(String error);
        void showError(String error);
        void showQiniuTokenSuccess(TokenBo data);
        void showUploadHashSuccess(String hash);

    }


    interface Presenter extends BasePresenter {
        void doGetUserInfo();
        void doUserAuth(String ident_card,String realname,String mobile,String code);
        void doUserSendCode(String mobile);
        void getEditPassword(String oldPassword,String newPassword,String reNewPassword);

        void uploadHead(String url,String token);
        void postQiniuToken();
        void editUserInfo(Integer userId,String avatar);
        void editNick(Integer userId,String username);}
}
